package com.gukun.springboot.tdengine.config;

import com.gukun.springboot.tdengine.service.delete.DeleteTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.stereotype.Component;

/**
 * @author: 4998
 * @createDate: 2025-06-04  09:22
 * @description: 服务启动时自动注册已经是启动状态的任务
 */
@Component
public class ScheduledTaskRunner implements ApplicationRunner {

    @Autowired
    private DeleteTaskService deleteTaskService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        deleteTaskService.initTask();
    }
}
